#ifndef POINT2_H
#define POINT2_H

#include "Vector2.h"

class Point2{
private:
    double x_, y_;
public:
    Point2(double x, double y);

    const bool operator==(const Point2& other) const;
    inline const bool operator!=(const Point2& other) const;

    const Point2 operator+() const;

    Point2& operator+=(const Vector2& v);
    const Point2 operator+(const Vector2& v) const;

    Point2& operator-=(const Vector2& v);
    const Point2 operator-(const Vector2& v) const;

    const Vector2 operator-(const Point2& other) const;

    friend std::ostream& operator<<(std::ostream& os, const Point2& p);

    const double distance(const Point2& other) const;

    const double& getX() const;
    const double& getY() const;
};

std::ostream& operator<<(std::ostream& os, const Point2& p);

#endif
